package com.jichangxiu.server.platform.entity.map;

import com.jichangxiu.server.platform.entity.dto.PlatformLoginQueryDto;
import com.jichangxiu.server.platform.entity.po.PlatformLogin;
import com.jichangxiu.server.platform.entity.vo.PlatformLoginQueryVo;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * PlatformLogBasic:
 *
 * @author Jcx
 * @create 2023-03-08 21:17
 */
@Mapper(builder = @Builder(disableBuilder = true))
public interface PlatformLoginBasic {

    public PlatformLoginBasic INSTANCE = Mappers.getMapper(PlatformLoginBasic.class);

    /**
     * 转换 PlatformLogin
     *
     * @param platformLoginQueryVo 视图对象
     * @return 数据库对象
     */
    public PlatformLogin toPlatformLogin(PlatformLoginQueryVo platformLoginQueryVo);

    /**
     * 转换 PlatformLoginQueryDto
     *
     * @param platformLogin 数据库对象
     * @return 传输对象
     */
    public PlatformLoginQueryDto toPlatformLoginQueryDto(PlatformLogin platformLogin);

    /**
     * 转换 PlatformLoginQueryDto 列表
     *
     * @param platformLoginList 数据库对象列表
     * @return 传输对象列表
     */
    public List<PlatformLoginQueryDto> toPlatformLoginQueryDtoList(List<PlatformLogin> platformLoginList);

}
